package A1_贪心算法;

import java.util.Arrays;

public class LC_455分发饼干1 {
    public int findContentChildren(int[] g, int[] s) {
        Arrays.sort(g);
        Arrays.sort(s);
        int res=0;
        int j=0;
        for(int i=0;i<s.length && j<g.length;i++){
            if(s[i]>=g[j]){
                res++;
                j++;
            }
        }
        return res;
    }
}
